﻿<html>
<head>
	<title>slideo</title>
	<script type="text/javascript" src="Silverlight.js"></script>
	<script type="text/javascript" src="Page.xaml.js"></script>
	<style type="text/css">
		#silverlightControlHost {
			height: 600px;
			width: 900px;
			z-index:0;
		}
		#errorLocation {
			width:900px;
			font-size: 16Px;
			text-align:left;
			padding-top:10px;
		}
		#slideoName {
			font-size: 14px;
			width:200px;
			height:22px;
		}
	</style>
	<script type="text/javascript">
		function createSilverlight()
		{
			var scene = new slideo.Page();
			Silverlight.createObjectEx({
				source: "Page.xaml",
				parentElement: document.getElementById("silverlightControlHost"),
				id: "SilverlightControl",
				properties: {
					width: "100%",
					height: "100%",
					isWindowless: true,
					version: "1.0"
				},
				events: {
					onLoad: Silverlight.createDelegate(scene, scene.handleLoad),
					onError: function(sender, args) {
						var errorDiv = document.getElementById("errorLocation");
						if (errorDiv != null) {
							var errorText = args.errorType + "- " + args.errorMessage;
									
							if (args.ErrorType == "ParserError") {
								errorText += "<br>File: " + args.xamlFile;
								errorText += ", line " + args.lineNumber;
								errorText += " character " + args.charPosition;
							}
							else if (args.ErrorType == "RuntimeError") {
								errorText += "<br>line " + args.lineNumber;
								errorText += " character " +  args.charPosition;
							}
							errorDiv.innerHTML = errorText;
						}	
					}
				}
			});
		}


		if (!window.Silverlight) 
			Silverlight = {};

		Silverlight.createDelegate = function(instance, method) {
			return function() {
				return method.apply(instance, arguments);
			}
		}
	</script>
	<link rel="stylesheet" href="resources/css/login_bar.css" type="text/css" />
	<link rel="stylesheet" href="resources/css/default.css" type="text/css" />
</head>

<body leftmargin="0" topmargin="50" marginwidth="0" marginheight="0" style="text-align:center;background-color:#eeeeee">
	<div style="text-align:left;width:900px;padding-bottom:10px;">
		<strong>Slideo</strong>名称：<input type="text" id="slideoName" onBlur="vsn(this.value);"><span style="padding-left:20px;font-size:12px;color:#FF0000" id="note"></span>
	</div>
	<div id="silverlightControlHost">
		<script type="text/javascript">
		    createSilverlight();
		</script>
	</div>
	<!-- Runtime errors from Silverlight will be displayed here.
	This will contain debugging information and should be removed or hidden when debugging is completed -->
	<div id='errorLocation'>点击<a href="player.php">这里</a>查看所有网友的<strong>Slideo</strong>作品</div>
</body>
</html>